home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3497 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: news.inet.fi!usenet
  2. From: Harri Halttunen <Harri.Halttunen@enermet.fi>
  3. Newsgroups: comp.lang.c++,comp.lang.c
  4. Subject: Re: Performance: C vs. C++
  5. Date: Wed, 24 Jan 1996 10:12:12 +0200
  6. Organization: Telecom Finland News Service
  7. Message-ID: <3105E9DC.1BE3@enermet.fi>
  8. References: <30F6BAAC.12B5@iastate.edu> <4da9pn$a45@news.bridge.net> <4dnpl2$c8g@classic.iinet.com.au>
  9. NNTP-Posting-Host: halttha.enermet.fi
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b5 (Win95; I)
  14.  
  15. > Not quite.  C is quite different from C++ from the performance point of
  16. > view.  The difference is not only in virtual functions and exceptions
  17. > but in class construction, destruction, etc... and most significantly in
  18. > Runtime Type Checking.  However, because machines are getting faster by
  19. > the day, this sort of "inefficiency" is hardly noticable.
  20.  
  21. All that is true (at least in the some point of view), but we have to remember 
  22. that usually in real applications this kind of comparison doesn't matter. This 
  23. is because fetching something from a database or file takes many times longer 
  24. than, for example, a virtual function call or to handle an excepion. Or even 
  25. check a type of an object at runtime.
  26.  
  27. I use C++ mainly, because it supports code and idea reuse better than other 
  28. languages.
  29.